package com.example.huangbei.log;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.loglib.Config;
import com.example.loglib.LogUtil;
import com.example.loglib.Proxy.AfterLog;
import com.example.loglib.Proxy.BeforeLog;
import com.example.loglib.Proxy.MyLog;
import com.example.loglib.Thread.SingleThreadPool;

public class MainActivity extends AppCompatActivity {

    private Task baseTask = new Task();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Config config = LogUtil.getInstance().getConfig();
        config.setMyTag("MyHello");
       // config.setShowI(false);


        final MyLog myLog = MyLog.getInstance();
        myLog.setAfterLog(new AfterLog() {
            @Override
            public void after(String tag, String content) {
               myLog.elog("main","after！");
            }
        });

        myLog.setBeforeLog(new BeforeLog() {
            @Override
            public void before(String tag, String content) {
                myLog.elog("main","before");
            }
        });

        myLog.ilog("main","mylog.ilog");
        myLog.ilog("mylog");
        myLog.elog("elog");
        myLog.wlog("wlog");
    }
}
